package com.victor.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.victor.dao.CertificateDao;
import com.victor.entity.Certificate;
import com.victor.service.CertificateService;

@Service
public class CertificateServiceimpl implements CertificateService {
	@Autowired
	private CertificateDao dao;

	// 获取专利证书列表
	@Override
	public List<Certificate> getAll() {
		return dao.getAll();
	}

	// 新建专利证书
	@Override
	public boolean build(Certificate certificate) {
		return dao.build(certificate) > 0 ? true : false;
	}

	// 修改专利证书信息
	@Override
	public boolean update(Certificate certificate) {
		return dao.update(certificate) > 0 ? true : false;
	}

	// 批量删除专利证书
	@Override
	public boolean batchDelete(int[] ids) {
		return dao.batchDelete(ids) > 0 ? true : false;
	}
}
